export default {
	data() {
		return {
			BindShow:false
		}
	},
	onLoad(){
		console.log();
		console.log(uni.getStorageSync("user").type == '0', uni.getStorageSync("token") !="");
		if(uni.getStorageSync("user").type == '0' && uni.getStorageSync("token") !=""){
			// this.BindShow = true
		}
	},
	methods: {
		Login() {
			uni.navigateTo({
				url: "/pages/Login/Login"
			})
		},
		handleClose(){
			this.BindShow = false
		},
		//绑定账号
		goBind() {
			uni.navigateTo({
				url: "/Public/BindAccount/BindAccount"
			})
		},
	},
	computed: {
		isToken() {
			console.log(uni.getStorageSync("token"));
			return uni.getStorageSync("token") != ""
		},
		bindShow() {
			return uni.getStorageSync("user").type == '0' && uni.getStorageSync("token") !=""
		},
		isStudent() {
			return uni.getStorageSync("roles").indexOf('tr') !=-1
		},
		//是否是游客 没有学校id 
		isTourist(){
			console.log(uni.getStorageSync("currSchool") != undefined);
			console.log(uni.getStorageSync("currSchool") != "");
			return uni.getStorageSync("currSchool") == ""
		}
	}
}
